package com.wn.cl.park.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yellow docker
 * @since 2025-03-11
 */
@Getter
@Setter
  @ApiModel(value = "Reservations对象", description = "")
public class Reservations implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("预订ID，主键，自动递增")
      @TableId
      private Long id;

      @ApiModelProperty("关联的用户ID")
      private Long userId;

      //订单号
      private Long orderId;

      //车牌号
      private String licensePlate;

      @ApiModelProperty("关联的车位ID")
      private Long parkingSpotId;

      @ApiModelProperty("支付时间")
      private LocalDateTime paymentTime;

  @ApiModelProperty("支付金额")
  private BigDecimal amount;

      @ApiModelProperty("到场时间")
      private LocalDateTime entryTime;

      @ApiModelProperty("订单状态（0-已锁定未支付, 1-已支付未入场, 2-已完成, 3-支付后取消，4、超时未入场，5未支付取消）")
      private Integer status;

      @ApiModelProperty("创建时间")
      @TableField(fill = FieldFill.INSERT)  //在插入操作的时候填充
      private LocalDateTime createdAt;

      @ApiModelProperty("更新时间")
      @TableField(fill = FieldFill.INSERT_UPDATE)  //在插入和更新时填充
      private LocalDateTime updatedAt;


}
